<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib  prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
%>
<html>
<head>
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <link rel="stylesheet" type="text/css" href="gallery/jquery.ad-gallery.css">
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script type="text/javascript" src="gallery/jquery.ad-gallery.js"></script>
  <script type="text/javascript">
  $(function() {
    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
    $('img.image1').data('ad-title', 'Title through $.data');
    $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
    $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');
    var galleries = $('.ad-gallery').adGallery();
    $('#switch-effect').change(
      function() {
        galleries[0].settings.effect = $(this).val();
        return false;
      }
    );
    $('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
    $('#toggle-description').click(
      function() {
        if(!galleries[0].settings.description_wrapper) {
          galleries[0].settings.description_wrapper = $('#descriptions');
        } else {
          galleries[0].settings.description_wrapper = false;
        }
        return false;
      }
    );
  });
  </script>
  <title>${requestScope.TARTICLE.articleTitle}</title>
</head>
<body>
<div id="main_container">

	<!--top  -->
	<jsp:include page="top.jsp" flush="true"></jsp:include>
	
	 <div id="main_content">
    
    	<!-- banner -->
    	<div id="middle_banner">
        	<div class="middle_banner_content">
       			 <img src="<%=path %>/images/banner_content.png" alt="" title="" width="417" height="142" />
            </div>
        </div>
        
        <div id="left_content">
        <h1>新闻:</h1>
        <div class="post">

					<div align="center" ><h2 class="title">${requestScope.TARTICLE.articleTitle}</h2></div>

					<div align="center">
					发表时间：<span class="date"><fmt:formatDate value="${requestScope.TARTICLE.articleCreateTime }" pattern="yyyy/MM/dd" />&nbsp;&nbsp;</span>
					
					作者：<span class="posted"><a href="#">${requestScope.TARTICLE.userName }</a></span></div>

					<div style="clear: both;">&nbsp;</div>

					<div class="entry">
						<span>${requestScope.TARTICLE.articleContent }</span>
					</div>
				</div>
				
		
  <!-- 画廊模块 -->
  <c:if test="${requestScope.ARTICLE_FILE ne null}">    
  <div id="container">
    <div id="gallery" class="ad-gallery">
      <div class="ad-image-wrapper">
      </div>
      <div class="ad-controls">
      </div>
      <div class="ad-nav">
        <div class="ad-thumbs">
          <ul class="ad-thumb-list">
           <c:forEach var="articleFile" items="${requestScope.ARTICLE_FILE}" varStatus="status">
            <li>
              <a href="<%=path%>${articleFile.articleFileUrl}">
                <img src="<%=path%>${articleFile.articleFileUrl }" width="90" height="60" />
              </a>
            </li>
            </c:forEach>
          </ul>
        </div>
      </div>
    </div>
    
    <p>切换图片播放方式:<select id="switch-effect">
      <option value="slide-hori">横向载入</option>
      <option value="slide-vert">垂直载入</option>
      <option value="resize">收缩/增长</option>
      <option value="fade">褪色</option>
      <option value="">默认</option>
    </select><br>
    </p>
  </div>
  </c:if>  
   <!-- 画廊模块 -->  
  		  <p class="links"><a href="#">阅读更多</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">发表评论</a></p>		      
        </div>
         
        <!-- 右边信息区 -->
        <c:if test="${requestScope.ARTICLE_FILE eq null}">
        <div id="right_content"> 
            
         <h1>Testimonials</h1>   
         <p class="news">
        <img src="<%=path %>/images/icon4.png" alt="" title="" class="left_img"  width="48" height="48" />
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        </p>            
            
          <p class="news">
        <img src="<%=path %>/images/icon4.png" alt="" title="" class="left_img" width="48" height="48" />
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        </p>  
        
          <p class="news">
        <img src="<%=path %>/images/icon4.png" alt="" title="" class="left_img" width="48" height="48" />
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        </p>         
                   
          <p class="news">
        <img src="<%=path %>/images/icon4.png" alt="" title="" class="left_img" width="48" height="48" />
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        </p>  
        
          <p class="news">
        <img src="<%=path %>/images/icon4.png" alt="" title="" class="left_img" width="48" height="48" />
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        </p>  
                
        </div> 
        </c:if>
          
	        <!-- foot -->   
	        <jsp:include page="foot.jsp" flush="true"></jsp:include>
    </div>
  
 </div> 
</body>
</html>